import request from '@/utils/request'

// 查询视频信息列表
export function listVideoInfo(query) {
  return request({
    url: '/video/content/list',
    method: 'get',
    params: query
  })
}

// 查询视频信息详细
export function getVideoInfo(videoId) {
  return request({
    url: '/video/content/' + videoId,
    method: 'get'
  })
}

// 新增视频信息
export function addVideoInfo(data) {
  return request({
    url: '/video/content',
    method: 'post',
    data: data
  })
}

// 修改视频信息
export function updateVideoInfo(data) {
  return request({
    url: '/video/content',
    method: 'put',
    data: data
  })
}

// 删除视频信息
export function delVideoInfo(videoId) {
  return request({
    url: '/video/content/' + videoId,
    method: 'delete'
  })
}

// 批量发布视频
export function batchPublish(videoIds) {
  return request({
    url: '/video/content/publish',
    method: 'put',
    data: videoIds
  })
}

// 批量下架视频
export function batchOffline(videoIds) {
  return request({
    url: '/video/content/offline',
    method: 'put',
    data: videoIds
  })
}

